[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Description: Convert dBase color string to dGE numeric value
Mapped Command:
FUNCTION __DgeColor(colorstr)
local fg, fg_bright
if at("/",colorstr) > 0 // check to make sure we have a color string
fg := upper(substr(colorstr,1,at("/",colorstr)-1)) // get the foreground color from the passed string
endif
fg_bright := if("+" $ fg,8,0) // if it's a bright color establish a memvar
do case // evaluate the color string
case substr(fg,1,1) == "N" .or. fg == " " // and return the integer value
retu(0+fg_bright)
case substr(fg,1,1) == "W" // if white is present in the string
retu(7+fg_bright)
otherwise // otherwise
retu(fg_bright + if('R' $ fg,4,0) + if('G' $ fg,2,0) + if('B' $ fg,1,0)) // added - PMF
endcase
RETURN(Void)
See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson